import { WeaSelect, WeaLocaleProvider,WeaHelpfulTip } from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;
export default class FloatLength extends React.Component {
    render() {
        const { ...restProps } = this.props;
        const options = [];
        for(var i=1;i<=15;i++){
            if(restProps.hasData){
                options.push({key:String(i),showname:String(i),disabled:i<restProps.value})
            }else{
                options.push({key:String(i),showname:String(i)})
            }
        }
        return (
            <div className="ant-row">
                <label>{getLabel('15212', '小数位数')}</label>
                <div style={{ display: 'flex' }}>
                    <WeaSelect ecId={`${this && this.props && this.props.ecId || ''}_WeaSelect@rmc28u`} options={options} {...restProps} ></WeaSelect>
                        <WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@eifmu7`} style={{ padding: '5px 0px 0px 5px' }}
                            title={<div><p>{getLabel('527415', '浮点数字段存在数据时,禁止缩小位数')}</p></div>}
                            placement="right"
                            />
                    </div>
            </div>
        )
    }
} 